﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;

namespace CrazyClient
{
    public class AssetFileInfo
    {
        public static bool Exists(string fileName)
        {
            return File.Exists(fileName);
               
        }
        public static AssetFileInfo Load(string fileName)
        {
            FileStream stream = new FileStream(fileName, FileMode.OpenOrCreate);
            XmlSerializer x = new XmlSerializer(typeof(Asset));

            AssetFileInfo si = (AssetFileInfo)x.Deserialize(stream);
            stream.Close();
            return si;

        }
        Guid _id, _version;
        string _name;
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }
        public Guid Id
        {
            get
            {
                return _id;
            }
            set
            {
                _id = value;
            }
        }
        public Guid Version
        {
            get
            {
                return _version;
            }
            set
            {
                _version = value;
            }
        }
    }
}
